﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data.Common;

namespace DbSharp.Framework.Driver.FieldPersistence
{
    class Excel2007OleFieldPersistence : IFieldPersistence
    {
        private ExcelOleFieldPersistence m_ExcelOleFieldPersistence = new ExcelOleFieldPersistence();

        #region IFieldPersistence<OleDbType> Members

        public List<int> ListSupportedScalarDataType
        {
            get
            {
                return m_ExcelOleFieldPersistence.ListSupportedScalarDataType;
            }
        }

        public List<int> ListSupportedRecordsetDataType
        {
            get
            {
                return m_ExcelOleFieldPersistence.ListSupportedRecordsetDataType;
            }
        }

        public string ConvertToString(object value, int valueType)
        {
            return m_ExcelOleFieldPersistence.ConvertToString(value, valueType);
        }

        public decimal RestoreStringToDecimal(string valueStr, int valueType)
        {
            return m_ExcelOleFieldPersistence.RestoreStringToDecimal(valueStr, valueType);
        }

        public Devart.Data.Oracle.OracleNumber RestoreStringToLargeDecimal(string valueStr, int valueType)
        {
            return m_ExcelOleFieldPersistence.RestoreStringToDecimal(valueStr, valueType);
        }


        public int GetSpecificDbType(DbDataReader dataReader, int columnIndex)
        {
            return m_ExcelOleFieldPersistence.GetSpecificDbType(dataReader, columnIndex);
        }

 


        public int GetSpecificDbType(DbParameter dbParam)
        {
            return m_ExcelOleFieldPersistence.GetSpecificDbType(dbParam);
        }


        public int NumberTypeWhenParseLiteral
        {
            get { return m_ExcelOleFieldPersistence.NumberTypeWhenParseLiteral; }
        }

 


        public bool IsStringType(int valueType)
        {
            return m_ExcelOleFieldPersistence.IsStringType(valueType);
        }

        #endregion
    }
}